#include <stdio.h>
#include <pcap.h>
int main(){
	
	pcap_t * pcap_t_p;
	pcap_pkthdr pkthdr;
	const u_char * content_p;
	char errbuf[1024];
	pcap_t_p = pcap_open_offline( "/home/fzhao/g711a.pcap" , errbuf );
	if( NULL == pcap_t_p ){
//		SAY( DP_DEBUG , "FAILED TO OPEN OFFLINE FILE\n");
		return 0;
	}


	content_p = pcap_next( pcap_t_p , &pkthdr );
	if( content_p ){
		#define HEADER_LEN (sizeof(struct ethhdr)+sizeof(iphdr)+sizeof(udphdr))
//		data_p = (BYTE *)content_p + HEADER_LEN ;
//		data_len = send_len = (pkthdr.caplen - HEADER_LEN );
	}else{
		pcap_close( pcap_t_p );
		pcap_t_p = NULL;
//		SAY( DP_DEBUG , "Data sent completely!\n");
		return 0;
	}		
	pcap_close( pcap_t_p );
}
